/* App.css 或 Layout.css */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh; /* 全屏高度 */
  background-color: #f7f7f7;
}

/* 内容区域样式 */
.outlet-container {
  flex: 1;
  /* overflow-y: auto; */
  /* padding: 12px; */
  background-color: white;
  /* margin: 8px; */
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  padding-bottom: 80px; /* 为固定的TabBar留出空间 */
}

/* 标签栏包装器 */
.tab-bar-wrapper {
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

/* 标签栏样式 */
.custom-tab-bar {
  height: 65px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-top: none;
  padding-bottom: env(safe-area-inset-bottom); /* 适配iPhone底部安全区域 */
}

.custom-tab-bar .adm-tab-bar-item {
  --title-font-size: 12px;
  --icon-size: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.custom-tab-bar .adm-tab-bar-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #1890ff, #52c41a);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 0 0 2px 2px;
  z-index: 1;
}

.custom-tab-bar .adm-tab-bar-item-active::before {
  width: 60%;
}

.custom-tab-bar .adm-tab-bar-item-title {
  margin-top: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.custom-tab-bar .adm-tab-bar-item-icon {
  transition: all 0.3s ease;
  position: relative;
}

/* 激活标签样式 */
.custom-tab-bar .adm-tab-bar-item-active {
  color: #1890ff !important;
  transform: translateY(-2px);
}

.custom-tab-bar .adm-tab-bar-item-active .adm-tab-bar-item-icon {
  transform: scale(1.1);
  color: #1890ff;
}

.custom-tab-bar .adm-tab-bar-item-active .adm-tab-bar-item-title {
  color: #1890ff;
  font-weight: 600;
}

/* 标签悬停效果 */
.custom-tab-bar .adm-tab-bar-item:hover {
  transform: translateY(-1px);
}

.custom-tab-bar .adm-tab-bar-item:hover .adm-tab-bar-item-icon {
  transform: scale(1.05);
}

/* 确保TabBar内容居中 */
.custom-tab-bar .adm-tab-bar-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
}

.custom-tab-bar .adm-tab-bar-item-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 页面切换动画 */
.outlet-container {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { 
    opacity: 0.5; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* 标签栏图标动画 */
.custom-tab-bar .adm-tab-bar-item-icon {
  position: relative;
}

.custom-tab-bar .adm-tab-bar-item-active .adm-tab-bar-item-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(24, 144, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* 响应式设计 - 平板及以上设备 */
@media (min-width: 768px) {
  .app-layout {
    max-width: 768px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
  }
  
  .outlet-container {
    margin: 12px;
    border-radius: 8px;
  }
  
  .tab-bar-wrapper {
    border-radius: 0 0 12px 12px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 768px;
    width: 100%;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .app-layout {
    background-color: #1f1f1f;
  }
  
  .outlet-container {
    background-color: #2a2a2a;
    color: #ffffff;
  }
  
  .tab-bar-wrapper {
    background: #2a2a2a;
    border-top-color: rgba(255, 255, 255, 0.1);
  }
  
  .custom-tab-bar {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
  }
}

